package hot_100;

public class 寻找旋转排序数组中的最小值 {
    public static void main(String[] args) {

    }

    public int findMin(int[] nums) {
        int l = 0, r = nums.length - 1;
        while (r > l) {
            int mid = (r + l) >> 1;
            if (nums[mid] > nums[l]) {
                l = mid + 1;
            } else {
                r = mid;
            }
        }
        return nums[l];
    }
}
